import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-04-18  13:28
 */
public class Test4 {
    public static int max(int a,int b) {
        if(a > b) {
            return a;
        }else {
            return b;
        }
    }
    public static double max(double c,double d,double e) {
        double tmp = (c > d) ? c:d;
        return (tmp > e) ? tmp : e;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a = scanner.nextInt();
        int b = scanner.nextInt();
        System.out.println(max(a, b));
        double c = scanner.nextDouble();
        double d = scanner.nextDouble();
        double e = scanner.nextDouble();
        System.out.println(max(c, d, e));
    }
}
